laravel hash::check

116

laravel hash::check -

if (Hash::check('plain-text', $hashedPassword)) {
    // The passwords match...
}

how validate hash string in laravel -

 $hash = '$2y$10$ug8B6Pxs546eQBNICxsEOOH3NgpXjOIo.g4rf1FPZk2xJncWcFUpu';

 if( strlen($hash) == 60 && preg_match('/^\$2y\$/', $hash ))

Comments

Submit
0 Comments